function [Ff_2,ff_2,Fi_2,fi_2]=solve_wage_offer_dist(Par1,wf_2,wi_2,n)

alphaf=Par1(7)
betaf=Par1(8)
alphai=Par1(9)
betai=Par1(10)



wf_2_n=(wf_2-wf_2(1))/(wf_2(n)-wf_2(1));
Ff_2=betainc(wf_2_n,alphaf,betaf);
ff_2=[eps;Ff_2(2:n)-Ff_2(1:n-1)];

wi_2_n=(wi_2-wi_2(1))/(wi_2(n)-wi_2(1));
Fi_2=betainc(wi_2_n,alphai,betai);
fi_2=[eps;Fi_2(2:n)-Fi_2(1:n-1)];


Ff_2=1-Ff_2;
Fi_2=1-Fi_2;
end

